const path = require('path');
const VueLoaderPlugin  = require('vue-loader/lib/plugin')

module.exports = {
    mode: 'production',
    experiments: {
        outputModule: true,
    },
    entry: './src/index.js',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'portsvg.js',
        library: {
            type: 'module',
        },
    },
    plugins:[
        new VueLoaderPlugin(),
    ],
    module: {
        rules: [
            {
                test: /\.vue$/i,
                use: ['vue-loader'],
            },
            {
              test: /\.css$/i,
              use: ['style-loader', 'css-loader'],
            },
            {
              test: /\.less$/i,
              use: [
                'style-loader',
                'css-loader',
                'less-loader',
              ],
            },
        ]
    }
};